package com.cskaoyan.wx.controller;

import com.cskaoyan.bean.ShowRegion;
import com.cskaoyan.service.MallManagementService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.wx.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author LiaoLong
 * @date 2021-05-12 22:04
 */
@RestController
@RequestMapping("wx/region")
public class RegionController {

    @Autowired
    private RegionService regionService;

    @GetMapping("list")
    public BaseRespVo list(Integer pid){
        List<ShowRegion> showRegions = regionService.getRegionByPid(pid);
        return BaseRespVo.ok(showRegions);
    }
}
